package driverSelf;
import org.openqa.selenium.edge.*;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class EdgeDr {
    private WebDriver driver=null;
    public EdgeDr(String propath, String driverpath){
        System.setProperty("webdriver.gecko.driver",driverpath);
        if(propath!=null&&propath.length()>0){
            System.setProperty("webdriver.Edge.driver",propath);
        }
        try{
            driver=new EdgeDriver();
        } catch (Exception e){
            e.printStackTrace();
            System.out.println("创建Edge driver 失败");
        }
    }
    public WebDriver getDriver(){
        return driver;
    }

}

